<template>
    <el-form :model="ruleForm" status-icon ref="ruleForm" label-width="100px" class="demo-ruleForm">
        <el-form-item>
            <el-button type="primary" @click="CheckLoginStatus()">验证登录状态</el-button>
            <el-button type="primary" @click="UserAccount()">获取账号信息</el-button>
            <el-button type="primary" @click="UserSubcount()">用户信息歌单等</el-button>
            <el-button type="primary" @click="UserLevel()">用户等级信息等</el-button>
            <el-button type="primary" @click="UserDetail()">获取用户详情</el-button>
            <el-button type="primary" @click="UserBinding()">获取用户绑定信息</el-button>
             <el-button type="primary" @click="UserCount()">获取用户私信通知</el-button>
        </el-form-item>
    </el-form>
</template>
<script>

import {  CheckLoginStatus, UserDetail , UserSubcount , UserLevel, UserAccount ,UserBinding  , UserCount} from '../api/user'
export default {
    data() {
        return {
            ruleForm: {
                phone: '15222767758',
                password: '',
                yzm: '',
                email: '2385845046@qq.com'
            },
            id: '',

        };
    },
    methods: {
     
        //检查登录状态
        async CheckLoginStatus() {
            let res = await CheckLoginStatus();
            console.log(res)
        },
        //获取账号信息
        async UserAccount() {
            let res = await UserAccount();
            // console.log(res)
            this.id = res.account.id;
            console.log(this.id)

        },
        //获取用户信息 , 歌单，收藏，mv, dj 数量
        async UserSubcount() { 
            let res = await UserSubcount();
            // console.log(res)
        },
        //获取用户等级信息
        async UserLevel() { 
            let res = await UserLevel();
            // console.log(res)
        },
         //获取用户详情
        async UserDetail() { 
            let res = await UserDetail(this.id);
            // console.log(res)

        },
         //获取用户绑定信息
        async UserBinding() { 
            let res = await UserBinding(this.id);
            // console.log(res)

        },

        
         //获取私信通知
        async UserCount() { 
            let res = await UserCount(this.id);
            // console.log(res)

        },
    },
    mounted() {
        this.UserAccount()
    } 
}
</script>
<style scoped>
/* .el-form-item--feedback {
    width: 300px;
} */
</style>